package cn.gemiman.daoyi.module.cms.controller.app.appsite.vo;

import cn.gemiman.daoyi.framework.excel.core.annotations.DictFormat;
import cn.gemiman.daoyi.framework.excel.core.convert.DictConvert;
import cn.gemiman.daoyi.module.cms.dal.dataobject.appsite.AppSiteDO;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.map.MapUtil;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

@Schema(description = "用户 APP - 友链 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AppAppSiteFriendChainRespVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "28630")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "站点类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "站点类型", converter = DictConvert.class)
    @DictFormat("terminal") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer terminalType;

    @Schema(description = "站点标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "8328")
    @ExcelProperty("站点标识")
    private String appId;

    @Schema(description = "站点名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @ExcelProperty("站点名称")
    private String appName;

    @Schema(description = "LOGO", example = "https://www.iocoder.cn")
    @ExcelProperty("LOGO")
    private String appLogoUrl;

    @Schema(description = "站点简介")
    @ExcelProperty("站点简介")
    private String appShortDesc;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;
    /**
     * 绑定域名
     */
    @Schema(description = "绑定域名")
    private String bindDomain;
    /**
     * 用户类型
     */
    private Integer userType;
    /**
     * 用户编号
     */
    private Long userId;
    /**
     * 用户昵称
     */
    private String userNickname;
    /**
     * 用户头像
     */
    private String userAvatar;
}
